package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ProserieId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class ProserieId implements java.io.Serializable {

	// Fields

	private String psnproduct;
	private String psnserial;

	// Constructors

	/** default constructor */
	public ProserieId() {
	}

	/** full constructor */
	public ProserieId(String psnproduct, String psnserial) {
		this.psnproduct = psnproduct;
		this.psnserial = psnserial;
	}

	// Property accessors

	@Column(name = "PSNPRODUCT", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getPsnproduct() {
		return this.psnproduct;
	}

	public void setPsnproduct(String psnproduct) {
		this.psnproduct = psnproduct;
	}

	@Column(name = "PSNSERIAL", unique = false, nullable = false, insertable = true, updatable = true, length = 50)
	public String getPsnserial() {
		return this.psnserial;
	}

	public void setPsnserial(String psnserial) {
		this.psnserial = psnserial;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProserieId))
			return false;
		ProserieId castOther = (ProserieId) other;

		return ((this.getPsnproduct() == castOther.getPsnproduct()) || (this
				.getPsnproduct() != null
				&& castOther.getPsnproduct() != null && this.getPsnproduct()
				.equals(castOther.getPsnproduct())))
				&& ((this.getPsnserial() == castOther.getPsnserial()) || (this
						.getPsnserial() != null
						&& castOther.getPsnserial() != null && this
						.getPsnserial().equals(castOther.getPsnserial())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPsnproduct() == null ? 0 : this.getPsnproduct()
						.hashCode());
		result = 37 * result
				+ (getPsnserial() == null ? 0 : this.getPsnserial().hashCode());
		return result;
	}

}